<!--  -->
<template>
  <a-modal
    @cancel="modalClose"
    :visible="visible"
    width="22.5rem"
    wrapClassName="teacher-code-modal"
    :footer="null"
    :centered="true"
  >
    <div class="teacher-code-content">
      <label class="teacher-code">
        <span>教学码</span>
        <input type="password" v-model="code" placeholder="请输入教学码" />
      </label>
      <div class="btn-group">
        <a-button type="primary" shape="round" @click="confirmClick">确定</a-button>
        <a-button type="primary" shape="round" @click="modalClose">取消</a-button>
      </div>
    </div>
  </a-modal>
</template>

<script>
import { Modal } from "ant-design-vue";
export default {
  name: "startCheckModal",
  components: {
    AModal: Modal,
  },
  data() {
    return {
      code: ''
    };
  },
  props: {
    visible: {
      type: Boolean,
      required: true,
    },
    ok: {
      type: Function,
    },
  },
  computed: {},
  watch: {},
  methods: {
    modalClose() {
      this.$emit("update:visible", false);
    },
    confirmClick() {
      this.$emit("ok", this.code);
    },
  },
  created() {},
  mounted() {},
};
</script>
<style lang="less" scoped>
/* @import url(); 引入公共css类 */

.teacher-code-content {
  padding-top: 30px;
  .teacher-code {
    display: flex;
    border-bottom: 1px solid #dddddd;
    align-items: center;
    font-size: 20px;
    padding-bottom: 10px;
    input {
      width: 180px;
      padding-left: 36px;
      border: none;
      outline: none;
      color: #CBCBCB;
    }
  }
  .btn-group {
    display: flex;
    margin-top: 50px;
    justify-content: space-between;
  }
}
</style>
